package com.study.base.io;

import java.io.*;

/**
 * @description: IoDemo1
 * @date: 2021/1/14 15:37
 * @author: hcm
 * @version: 1.0
 */
public class IoDemo2 {
    public static void main(String[] args) throws IOException {

        String data = "hello html hello ps";
        //铺设磁盘管道
        FileOutputStream fos = new FileOutputStream("D:\\2021114.txt");
        //写数据
        fos.write(data.getBytes());
        //关闭流
        fos.close();

    }
}
